package com.zuipin.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.zuipin.entity.${className!""};
import com.zuipin.util.Pagination;

/**
 *  ${remark!""}mapper
  * @ClassName: ${className!""}Mapper
  * @Description: TODO
  * @author ${author!"robot"}
  * @date ${.now?string("yyyy年MM月dd7日 HH:mm:ss")}
  *
 */
@Mapper
public interface ${className!""}Mapper {
	/**
	  * 查询${remark!""}
	  * @Title: findBy${PKName!""}
	  * @author ${author!"robot"}
	  * @date ${.now?string("yyyy年MM月dd7日 HH:mm:ss")}
	  * @param <#list propertyEntityList as pro><#if pro.pkType=1>${pro.propName}</#if><#if !pro_has_next>,</#if></#list>
	  * @return
	  * @return ${className!""}
	 */
	public ${className!""} findBy${PKName!""}(<#assign i=0 /><#list propertyEntityList as pro><#if pro.pkType=1><#if (i>0) >,</#if> ${pro.propType} ${pro.propName}<#assign i=i+1 /></#if></#list>);
	
	/**
	  * 插入${remark!""}操作
	  * @Title: insert
	  * @author ${author!"robot"}
	  * @date ${.now?string("yyyy年MM月dd7日 HH:mm:ss")}
	  * @param ${obName!""}
	  * @return void
	 */
	public void insert(${className!""} ${obName!""});
	
	/**
	  *  更新${remark!""}操作
	  * @Title: update
	  * @author ${author!"robot"}
	  * @date ${.now?string("yyyy年MM月dd7日 HH:mm:ss")}
	  * @param ${obName!""}
	  * @return void
	 */
	public void update(${className!""} ${obName!""});
	
	/**
	  * 删除${remark!""}
	  * @Title: delete
	  * @author ${author!"robot"}
	  * @date ${.now?string("yyyy年MM月dd7日 HH:mm:ss")}
	  * @param <#list propertyEntityList as pro><#if pro.pkType=1>${pro.propName}</#if><#if !pro_has_next>,</#if></#list>
	  * @return void
	 */
	public void delete(<#assign i=0 /><#list propertyEntityList as pro><#if pro.pkType=1><#if (i>0) >,</#if> ${pro.propType} ${pro.propName}<#assign i=i+1 /></#if></#list>);
	
	/**
	 * 搜索${remark!""}, 并自动分页
	  *  @Title: seach${className!""}
	  * @author ${author!"robot"}
	  * @date ${.now?string("yyyy年MM月dd7日 HH:mm:ss")}
	  * @param ${obName!""}
	  * @param page
	  * @return
	  * @return List<${className!""}>
	 */
	public List<${className!""}> seach${className!""}(@Param("${obName!""}") ${className!""} ${obName!""}, @Param("page") Pagination page);
}